//
//  QHHCPDownLoader.h
//  QHealthForDoctor
//
//  Created by 李志良的mac mini on 2020/4/14.
//  Copyright © 2020 李 志良. All rights reserved.
//

#import <Foundation/Foundation.h>
//#import "AsyncFileBuffer.h"
NS_ASSUME_NONNULL_BEGIN

typedef void (^QHHCPDownLoaderDownLoadCompleteBlock)(void);
typedef void (^QHHCPDownLoaderProgerssBlock)(float progress);
typedef void (^QHHCPDownLoaderDownLoadFailedBlock)(NSString *errMsg);
typedef void (^QHHCPDownLoaderDownLoadStatusBlock)(BOOL isConnected);


@interface QHHCPDownLoader : NSObject

@property(nonatomic,assign)NSInteger downLoadedFileCount;//下载完成的文件数量
@property(nonatomic,retain)NSArray * updateFilesArray;
//@property(nonatomic,retain)AsyncFileBuffer *asyncBuffer;
@property(nonatomic,retain)NSString * wwwFolderName;
@property(nonatomic,copy)QHHCPDownLoaderDownLoadCompleteBlock downloadCompleteBlock;
@property(nonatomic,copy)QHHCPDownLoaderProgerssBlock downloadProgressBlock;
@property(nonatomic,copy)QHHCPDownLoaderDownLoadFailedBlock downloadFaildBlock;
@property(nonatomic,copy)QHHCPDownLoaderDownLoadStatusBlock downloadSuspendBlock;
-(id)initWithHCPWWWFolderName:(NSString*)wwwFolderName Success:(QHHCPDownLoaderDownLoadCompleteBlock)success Failed:(QHHCPDownLoaderDownLoadFailedBlock)failed;
-(void)downLoadUpdateFilesWithDiffArray:(NSArray*)diffArray;
@end

NS_ASSUME_NONNULL_END
